<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>SourceMapGenerator (Closure Compiler)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="SourceMapGenerator (Closure Compiler)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapFormat.html" title="enum in com.google.debugging.sourcemap"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorFactory.html" title="class in com.google.debugging.sourcemap"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/debugging/sourcemap/SourceMapGenerator.html" target="_top">Frames</a></li>
<li><a href="SourceMapGenerator.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.google.debugging.sourcemap</div>
<h2 title="Interface SourceMapGenerator" class="title">Interface SourceMapGenerator</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV1.html" title="class in com.google.debugging.sourcemap">SourceMapGeneratorV1</a>, <a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV2.html" title="class in com.google.debugging.sourcemap">SourceMapGeneratorV2</a>, <a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorV3.html" title="class in com.google.debugging.sourcemap">SourceMapGeneratorV3</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">SourceMapGenerator</span></pre>
<div class="block">Collects information mapping the generated (compiled) source back to
 its original source for debugging purposes</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#addMapping(java.lang.String, java.lang.String, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition)">addMapping</a></strong>(java.lang.String&nbsp;sourceName,
          java.lang.String&nbsp;symbolName,
          <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;sourceStartPosition,
          <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;outputStartPosition,
          <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;outputEndPosition)</code>
<div class="block">Adds a mapping for the given node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#appendIndexMapTo(java.lang.Appendable, java.lang.String, java.util.List)">appendIndexMapTo</a></strong>(java.lang.Appendable&nbsp;out,
                java.lang.String&nbsp;name,
                java.util.List&lt;<a href="../../../../com/google/debugging/sourcemap/SourceMapSection.html" title="class in com.google.debugging.sourcemap">SourceMapSection</a>&gt;&nbsp;sections)</code>
<div class="block">Appends the index source map to the given buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#appendTo(java.lang.Appendable, java.lang.String)">appendTo</a></strong>(java.lang.Appendable&nbsp;out,
        java.lang.String&nbsp;name)</code>
<div class="block">Appends the source map to the given buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#reset()">reset</a></strong>()</code>
<div class="block">Resets the source map for reuse.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#setStartingPosition(int, int)">setStartingPosition</a></strong>(int&nbsp;offsetLine,
                   int&nbsp;offsetIndex)</code>
<div class="block">Sets the source code that exists in the buffer for which the
 generated code is being generated.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#setWrapperPrefix(java.lang.String)">setWrapperPrefix</a></strong>(java.lang.String&nbsp;prefix)</code>
<div class="block">Sets the prefix used for wrapping the generated source file before
 it is written.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/debugging/sourcemap/SourceMapGenerator.html#validate(boolean)">validate</a></strong>(boolean&nbsp;validate)</code>
<div class="block">Whether to perform additional validation on the source map.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="appendTo(java.lang.Appendable, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendTo</h4>
<pre>void&nbsp;appendTo(java.lang.Appendable&nbsp;out,
            java.lang.String&nbsp;name)
              throws java.io.IOException</pre>
<div class="block">Appends the source map to the given buffer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - The stream to which the map will be appended.</dd><dd><code>name</code> - The name of the generated source file that this source map
   represents.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="appendIndexMapTo(java.lang.Appendable, java.lang.String, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendIndexMapTo</h4>
<pre>void&nbsp;appendIndexMapTo(java.lang.Appendable&nbsp;out,
                    java.lang.String&nbsp;name,
                    java.util.List&lt;<a href="../../../../com/google/debugging/sourcemap/SourceMapSection.html" title="class in com.google.debugging.sourcemap">SourceMapSection</a>&gt;&nbsp;sections)
                      throws java.io.IOException</pre>
<div class="block">Appends the index source map to the given buffer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - The stream to which the map will be appended.</dd><dd><code>name</code> - The name of the generated source file that this source map
   represents.</dd><dd><code>sections</code> - An ordered list of map sections to include in the index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="reset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>void&nbsp;reset()</pre>
<div class="block">Resets the source map for reuse. A reset needs to be called between
 each generated output file.</div>
</li>
</ul>
<a name="addMapping(java.lang.String, java.lang.String, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition, com.google.debugging.sourcemap.FilePosition)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMapping</h4>
<pre>void&nbsp;addMapping(java.lang.String&nbsp;sourceName,
              @Nullable
              java.lang.String&nbsp;symbolName,
              <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;sourceStartPosition,
              <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;outputStartPosition,
              <a href="../../../../com/google/debugging/sourcemap/FilePosition.html" title="class in com.google.debugging.sourcemap">FilePosition</a>&nbsp;outputEndPosition)</pre>
<div class="block">Adds a mapping for the given node.  Mappings must be added in order.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sourceName</code> - The file name to use in the generate source map
     to represent this source.</dd><dd><code>symbolName</code> - The symbol name associated with this position in the
     source map.</dd><dd><code>sourceStartPosition</code> - The starting position in the original source for
     represented range outputStartPosition to outputEndPosition in the
     generated file.</dd><dd><code>outputStartPosition</code> - The position on the starting line</dd><dd><code>outputEndPosition</code> - The position on the ending line.</dd></dl>
</li>
</ul>
<a name="setWrapperPrefix(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWrapperPrefix</h4>
<pre>void&nbsp;setWrapperPrefix(java.lang.String&nbsp;prefix)</pre>
<div class="block">Sets the prefix used for wrapping the generated source file before
 it is written. This ensures that the source map is adjusted for the
 change in character offsets.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>prefix</code> - The prefix that is added before the generated source code.</dd></dl>
</li>
</ul>
<a name="setStartingPosition(int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStartingPosition</h4>
<pre>void&nbsp;setStartingPosition(int&nbsp;offsetLine,
                       int&nbsp;offsetIndex)</pre>
<div class="block">Sets the source code that exists in the buffer for which the
 generated code is being generated. This ensures that the source map
 accurately reflects the fact that the source is being appended to
 an existing buffer and as such, does not start at line 0, position 0
 but rather some other line and position.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>offsetLine</code> - The index of the current line being printed.</dd><dd><code>offsetIndex</code> - The column index of the current character being printed.</dd></dl>
</li>
</ul>
<a name="validate(boolean)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>validate</h4>
<pre>void&nbsp;validate(boolean&nbsp;validate)</pre>
<div class="block">Whether to perform additional validation on the source map.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>validate</code> - </dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapFormat.html" title="enum in com.google.debugging.sourcemap"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/debugging/sourcemap/SourceMapGeneratorFactory.html" title="class in com.google.debugging.sourcemap"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/debugging/sourcemap/SourceMapGenerator.html" target="_top">Frames</a></li>
<li><a href="SourceMapGenerator.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
